<?php

namespace App\Http\Controllers\admin;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;

class RecordController extends Controller
{
    public function index(Request $request)
    {
    	$data=DB::table('record')
					->where("name","like","%".$request->input('search')."%" )
					->paginate($request->input('pages',10));
		foreach($data as $k =>$v)
		{
			$data[$k]->time=date("Y年m月d日 H:m:s",$v->time);
		}
		return view('admin.record.index',['data'=>$data,'request'=>$request->all()]);
    }
}
